package com.managertrade.dao.mysql.repository;

import com.managertrade.dao.mysql.entity.UserCopyTrade;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
public interface UserCopyTradeRepository extends JpaRepository<UserCopyTrade, Long> {


    // 查询所有未平仓的
    List<UserCopyTrade> findByStatus(String status);

    List<UserCopyTrade> findByStatusAndOrdIdAndTraderId(String status,String ordId,String traderId);

    List<UserCopyTrade> findByStatusAndTraderId(String status,String traderId);

    List<UserCopyTrade> findBySubPosIdAndTraderId(String subPosId,String traderId);

    List<UserCopyTrade> findByTraderId(String traderId);
    /**
     * 根据用户ID和交易员ID查询
     */
    List<UserCopyTrade> findByUserIdAndTraderId(Long userId, String traderId);
}
